package com.example.activity_service.dao;


import com.example.activity_service.vo.Signin;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;


import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface Signindao {

    @Select("select mask from t_sign where userid=#{userid}")
    List<Signin> qd(String userid);

    @Delete("delete from t_sign where id=#(id)")
    int expurgate(int id);

    @Insert("insert into t_sign (userid,datemonth,mask,continuesignmonth) values(#{userid},NOW(),#{mask},#{cc})")
    void cancel(int userid, int mask,int cc);

    @Update("update t_sign set userid='${userid}',datemonth='${datemonth}',mask='${mask}',continuesignmonth='$continuesignmonth' where id='$id'")
    int amend(int id,int userid,Date datemonth,int mask,int continuesignmonth);
}
